package com.jz.netthings.application.providerCollection.mapper.mysql;

import com.jz.netthings.application.providerCollection.bean.CollPrintInfo;
import com.jz.netthings.application.providerCollection.bean.ProviderCollection;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zyl
 * @since 2019-03-14
 */
public interface ProviderCollectionMapper extends BaseMapper<ProviderCollection> {

    /**
     * 查询采浆打印数据
     * @param beginTime
     * @param endTime
     * @return
     */
    List<CollPrintInfo> selectPrintList(@Param("beginTime") String beginTime,@Param("endTime")  String endTime);
    /**
     * 查询采浆耗材
     * @param beginTime
     * @param endTime
     * @return
     */
    @Select("SELECT DISTINCT useHcCode FROM provider_collection WHERE collectionDate BETWEEN #{beginTime} AND #{endTime} AND isDeal = 1 AND useHcCode IS NOT NULL ")
    List<String> selectHcCode(@Param("beginTime") String beginTime,@Param("endTime")  String endTime);
}
